home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 April / macformat-049.iso / mac / Shareware Plus / Developers / dropg++ / HOW DOES IT WORK < prev    next >
Encoding:
Text File  |  1996-10-31  |  2.0 KB  |  41 lines  |  [TEXT/ttxt]

  1. The guts of the system is a bog-standard installation
  2. of g++ for 68020/BSD unix sitting on top of an emulation
  3. library which manages the various programs through applevents
  4.  
  5. the source code for the compiler is available from prep.ai.mit.edu
  6. and many other places, there are no source code changes necessary,
  7. it just needs to be configured for hp300bsd and linked with libc.a
  8. which contains the emulation library. The necessary files will
  9. be called gcc2.7.2.tar.gz, binutils-2.6.tar.gz
  10.  
  11. the source code for BSD4.4 is available from src.doc.ic.ac.uk
  12. and many other places. The source code for the emulation library is
  13. included in the usr:src:mac folder
  14.  
  15. to recompile the emulation library you will need apple toolbox headers
  16. (ftp.support.apple.com) gcc-1.37r15 (MPW version of gcc)
  17. filter.sed (included, makes output of gcc-1.37 acceptable to gas)
  18. ar (archiver) and ranlib (prepares library for linking)
  19.  
  20. On the whole, I recommend using a unix box for this purpose rather than
  21. trying to do it all on the mac, though this is certainly possible if you
  22. have PATMOS
  23.  
  24. the emulation library recognises the file name a.out as being special
  25. and copies the mac resource fork from the ld program to make a standalone
  26. executable. At this stage the output of ld is still relocatable
  27.  
  28. when you launch the application, the resource fork code fixes up the addresses
  29. as necessary and reads the program from the applications data fork.
  30. At this stage you could get an obscure error message if the file format is
  31. incorrect, or if there are undefined external references. You can pre-empt this
  32. (check the application) by dropping it on the ld (linker) application by itself
  33.  
  34. there are no variations in compiler memory model available, everything is 32-bit.
  35. the code is optimised for 68040 but you can change this in the specs file.
  36.  
  37. the C++ standard library is based on libg++, interfaced to BSD libc
  38. inside the emulation library certain assumptions are necessary such as
  39. maintaining the A5 register, these routines are distinguised by not having an
  40. underscore in front of the subroutine name.
  41.